<template>
  <div class="container">
    Vue
    {{ msg }}
    <img src="./assets/img/a.png" alt="" />
    <span class="iconfont icon-geren1"></span>
    <HelloWorld></HelloWorld>
  </div>
</template>
<script>
import img from './assets/img/logo.png'
import HelloWorld from './components/HelloWord.vue'

function createData() {
  return new Promise((resolve, reject) => {
    resolve({ code: 1 })
  })
}

export default {
  components: { HelloWorld },
  data() {
    return {
      msg: 'hello',
    }
  },
  created() {
    this.getData(1, 2, 3, 4, 5)
    const s = new Set()

    ;[2, 3, 5, 4, 5, 2, 2].forEach((x) => s.add(x))

    for (let i of s) {
      console.log(i)
    }
  },
  methods: {
    async getData(a, ...rest) {
      console.log(rest, 'rest')
      const res = await createData()
      console.log(res, 'res')
    },
  },
}
</script>
<style lang="scss">
/* @import './assets/css/variables.scss'; */
.container {
  /* background: $color; */
  /* @include flexCenter; */
  background: $bgColor;
}
</style>
